Building the Model: General Elements > Pre-defined Tank Subroutines > Tank_Dec

Tank_Dec

Syntax samples

TANK_DEC (<Tank ID>, <Quantity>)

TANK_DEC (SupplyTankB, 1000)

Description

Instantly decreases the level of a tank by a specified quantity. If the tank has insufficient quantity, it empties as material becomes available. MedModel sets the tank state to Tank_Idle if you decrease the level to 0. Otherwise the state remains unchanged.

 

Use Tank_Dec to instantly remove a specific quantity from a tank.

Components

<Tank ID>

The tank name or location index number.

<Quantity>

The number of units by which to decrement the contents of the tank (gallons, pounds).

Example

A fill tank fills one 10-gallon container every 15 seconds. After filling, each container moves to a location called FillStation. To model this activity, define the following activated subroutine (this subroutine creates a filled container every 15 seconds):

 

Tank_Loop //logic repeats continuously

{

WAIT 15 SEC

Tank_Dec(FillTank, 10)

ORDER 1 Container TO FillStation

}

See Also

Tanks.

 


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com